from django.db import models


# Create your models here.

class WarehouseStock(models.Model):
    """
    仓库存量数据表
    id: 仓库代码
    name: 仓库名
    inventory: 库存
    inventoryRatio: 库存占比
    inventoryTotal: 总计（所有仓库为同一值）
    """
    id = models.CharField(max_length=30, primary_key=True)
    name = models.CharField(max_length=30, null=True)
    inventory = models.CharField(max_length=30, null=True)
    inventoryRatio = models.CharField(max_length=30, null=True)
    inventoryTotal = models.CharField(max_length=30, null=True)


class ShelfUsage(models.Model):
    """
    货架用量数据表
    id: 货架编号
    usage: 用量
    """
    id = models.CharField(max_length=30, primary_key=True)
    usage = models.CharField(max_length=30, null=True)


class MaterialInventory(models.Model):
    """
    物料存量数据表
    id: 物料编码
    name: 物料名
    inventory: 存量
    inventoryTotal: 总计（所有物料为同一值）
    """
    id = models.CharField(max_length=30, primary_key=True)
    name = models.CharField(max_length=30, null=True)
    inventory = models.CharField(max_length=30, null=True)
    inventoryTotal = models.CharField(max_length=30, null=True)


class ClassifiedMaterialInventory(models.Model):
    """
    不同分类物料存量数据表
    name: 物料类名
    inventory: 存量
    inventoryRatio: 物料类别占比
    """
    name = models.CharField(max_length=30, null=True)
    inventory = models.CharField(max_length=30, null=True)
    inventoryRatio = models.CharField(max_length=30, null=True)


class InOutWarehouse(models.Model):
    """
    出入库量数据表
    id: 物料编码
    name: 物料名
    daytime: 日期
    inWarehouse: 入库量
    outWarehouse: 出库量
    """
    id = models.CharField(max_length=30, primary_key=True)
    name = models.CharField(max_length=30, null=True)
    daytime = models.CharField(max_length=30, null=True)
    inWarehouse = models.CharField(max_length=30, null=True)
    outWarehouse = models.CharField(max_length=30, null=True)
